package com.ideacome.test.service;

import com.ideacome.test.common.mock.config.annotation.Mockable;
import com.ideacome.test.modle.TestBO;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.sound.midi.Soundbank;
import java.util.Date;

@Aspect
@Component("bbb")
public class DAspectService {

    @Pointcut("@annotation(com.ideacome.test.service.TestAround)")//指向自定义注解路径
    public void p1() {
    }

    /**
     * 切面记录系统日志
     *
     * @param point
     * @return
     * @throws Throwable
     */
    @Around("p1()")//
    public Object around1(ProceedingJoinPoint point) throws Throwable {
        System.out.println("a1");
        return point.proceed();
    }


}
